import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:enterprise_v8/app/components/custom_app_bar.dart';
import 'package:enterprise_v8/app/core/core.dart';

/// 通用的web显示页面
/// demo:
/// ```dart
/// Get.to(CustomWbePage(url: url))
/// ```
class CustomWbePage extends StatefulWidget {
  const CustomWbePage({required this.url, super.key});

  final String url;

  @override
  State<CustomWbePage> createState() => _CustomWbePageState();
}

class _CustomWbePageState extends State<CustomWbePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CustomAppBar(),
      body: InAppWebView(
        initialUrlRequest: URLRequest(url: WebUri(widget.url)),
      ),
    );
  }
}
